factor a sum of cubes